package org.acra.b;

import android.content.ContentResolver;
import android.content.Context;
import android.provider.Settings.Secure;
import android.provider.Settings.System;
import android.util.Log;
import java.lang.reflect.Field;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import org.acra.ACRA;
import org.acra.c;

final class p
{
  public static String a(Context paramContext)
  {
    StringBuilder localStringBuilder = new StringBuilder();
    Field[] arrayOfField = Settings.System.class.getFields();
    int i = arrayOfField.length;
    int j = 0;
    while (true)
      if (j < i)
      {
        Field localField = arrayOfField[j];
        if ((!localField.isAnnotationPresent(Deprecated.class)) && (localField.getType() == String.class));
        try
        {
          String str = Settings.System.getString(paramContext.getContentResolver(), (String)localField.get(null));
          if (str != null)
            localStringBuilder.append(localField.getName()).append("=").append(str).append("\n");
          j++;
        }
        catch (IllegalArgumentException localIllegalArgumentException)
        {
          while (true)
            Log.w(ACRA.LOG_TAG, "Error : ", localIllegalArgumentException);
        }
        catch (IllegalAccessException localIllegalAccessException)
        {
          while (true)
            Log.w(ACRA.LOG_TAG, "Error : ", localIllegalAccessException);
        }
      }
    return localStringBuilder.toString();
  }

  private static boolean a(Field paramField)
  {
    if ((paramField == null) || (paramField.getName().startsWith("WIFI_AP")))
      return false;
    String[] arrayOfString = ACRA.getConfig().I();
    int i = arrayOfString.length;
    for (int j = 0; ; j++)
    {
      if (j >= i)
        break label58;
      String str = arrayOfString[j];
      if (paramField.getName().matches(str))
        break;
    }
    label58: return true;
  }

  public static String b(Context paramContext)
  {
    StringBuilder localStringBuilder = new StringBuilder();
    Field[] arrayOfField = Settings.Secure.class.getFields();
    int i = arrayOfField.length;
    int j = 0;
    while (true)
      if (j < i)
      {
        Field localField = arrayOfField[j];
        if ((!localField.isAnnotationPresent(Deprecated.class)) && (localField.getType() == String.class) && (a(localField)));
        try
        {
          String str = Settings.Secure.getString(paramContext.getContentResolver(), (String)localField.get(null));
          if (str != null)
            localStringBuilder.append(localField.getName()).append("=").append(str).append("\n");
          j++;
        }
        catch (IllegalArgumentException localIllegalArgumentException)
        {
          while (true)
            Log.w(ACRA.LOG_TAG, "Error : ", localIllegalArgumentException);
        }
        catch (IllegalAccessException localIllegalAccessException)
        {
          while (true)
            Log.w(ACRA.LOG_TAG, "Error : ", localIllegalAccessException);
        }
      }
    return localStringBuilder.toString();
  }

  public static String c(Context paramContext)
  {
    if (a.a() < 17)
      return "";
    StringBuilder localStringBuilder = new StringBuilder();
    try
    {
      Class localClass = Class.forName("android.provider.Settings$Global");
      Field[] arrayOfField = localClass.getFields();
      Method localMethod = localClass.getMethod("getString", new Class[] { ContentResolver.class, String.class });
      int i = arrayOfField.length;
      for (int j = 0; j < i; j++)
      {
        Field localField = arrayOfField[j];
        if ((!localField.isAnnotationPresent(Deprecated.class)) && (localField.getType() == String.class) && (a(localField)))
        {
          Object[] arrayOfObject = new Object[2];
          arrayOfObject[0] = paramContext.getContentResolver();
          arrayOfObject[1] = ((String)localField.get(null));
          Object localObject = localMethod.invoke(null, arrayOfObject);
          if (localObject != null)
            localStringBuilder.append(localField.getName()).append("=").append(localObject).append("\n");
        }
      }
    }
    catch (IllegalArgumentException localIllegalArgumentException)
    {
      Log.w(ACRA.LOG_TAG, "Error : ", localIllegalArgumentException);
      return localStringBuilder.toString();
    }
    catch (IllegalAccessException localIllegalAccessException)
    {
      while (true)
        Log.w(ACRA.LOG_TAG, "Error : ", localIllegalAccessException);
    }
    catch (ClassNotFoundException localClassNotFoundException)
    {
      while (true)
        Log.w(ACRA.LOG_TAG, "Error : ", localClassNotFoundException);
    }
    catch (SecurityException localSecurityException)
    {
      while (true)
        Log.w(ACRA.LOG_TAG, "Error : ", localSecurityException);
    }
    catch (NoSuchMethodException localNoSuchMethodException)
    {
      while (true)
        Log.w(ACRA.LOG_TAG, "Error : ", localNoSuchMethodException);
    }
    catch (InvocationTargetException localInvocationTargetException)
    {
      while (true)
        Log.w(ACRA.LOG_TAG, "Error : ", localInvocationTargetException);
    }
  }
}

/* Location:           D:\Studium\Bachelorarbeit\BA Marcus Wobig\BA\BA\Decompiler\PicturePassword APK\Programm\PicturePassword_dex2jar.jar
 * Qualified Name:     org.acra.b.p
 * JD-Core Version:    0.6.2
 */